
include ../../_tableMixins

- pagexray.assets.sort(function(a, b){return b.transferSize-a.transferSize})

h3 Largest assets on the page (by transfer size)
.responsive
  table(data-sortable, id='largestAssetsOnThePage')
    +rowHeading(['URL', 'Type', 'Transfer Size', 'Content Size'])
    - let n = 0;
    each asset in pagexray.assets
     tr
      td.url.assetsurl(data-title='URL')
        a(href=asset.url)= h.shortAsset(asset.url)
      td(data-title='Content Type') #{asset.type}
      +sizeCell('transferSize', asset.transferSize)
      +sizeCell('contentSize', asset.contentSize)
      - n++
      - if (n>19) break
